home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / language / dino / dino_bot.1 / source / shell2 / dino2 < prev    next >
Encoding:
Text File  |  1991-03-10  |  2.6 KB  |  104 lines

  1.  
  2. # Copyright, 1990, Regents of the University of Colorado
  3. #
  4. #  This is a Bourne shell script that handles the second half of the
  5. #  DINO compilation process, that is, the half that happens on the
  6. #  parallel machine.  Please leave the first line blank so that
  7. #  the machine knows that this is a bourne shell script.
  8. #
  9.  
  10. #
  11. #  Call the initialization script.
  12. #
  13. . dino2.init
  14.  
  15. #
  16. #  Determine if this script is called by the "dino" script or
  17. #  directly by the programmer and set the defaults accordingly.
  18. #
  19. case $1 in
  20.  T) Quiet=$1
  21.     Destination=$2
  22.     SuffixModel=$3
  23.     Suffix=$4
  24.     shift 4;;
  25.  F) Quiet=$1
  26.     Destination=$2
  27.     SuffixModel=$3
  28.     Suffix=$4
  29.     shift 4;;
  30.  *) ;;
  31. esac
  32.  
  33. #
  34. #  Get the machine specific compiling and linking information we will
  35. #  need.
  36. #
  37. if test -f $Dhome/bin/local/dino2.$Destination
  38. then
  39.   . $Dhome/bin/local/dino2.$Destination
  40. else
  41.   echo "     Illegal destination provided to dino2 ($Destination)"
  42.   exit 1
  43. fi
  44.  
  45. for temp in $*
  46.   do Root=`dinortex $SuffixModel $Suffix $temp`
  47.      set $Root
  48.      Name=$1
  49.      Root=$2
  50.      dinochk2 $temp $Root
  51.      case $? in
  52.       0) case $Quiet in
  53.            T) ;;
  54.            F) echo "          $Root is up to date"
  55.               echo;;
  56.          esac;;
  57.       *) case $Quiet in
  58.            T) ;;
  59.            F) echo "          Compiling $temp to $Root . . ."
  60.               echo ;;
  61.          esac
  62.          case $Root in
  63.           host) cc $Dhostccopt -c -I${Dhome}/source/inc $temp 
  64.                 case $? in
  65.                  0) ;;
  66.                  *) echo "     host compilation failed."
  67.                     echo
  68.                     rm -f $Name.o
  69.                     exit 1;;
  70.                 esac
  71.                 cc -o host $Dhostlnopt $Name.o $Dhostlibs
  72.                 case $? in
  73.                  0) rm -f $Name.o;;
  74.                  *) echo "     host link failed."
  75.                     echo
  76.                     rm -f $Name.o host
  77.                     exit 1;;
  78.                 esac;;
  79.           *)    cc $Dnodeccopt -c -I${Dhome}/source/inc $temp
  80.                 case $? in
  81.                  0) ;;
  82.                  *) echo "     $Root compilation failed."
  83.                     echo
  84.                     rm -f $Name.o
  85.                     exit 1;;
  86.                 esac
  87.                 $Dnodelinkcmd -o $Root $Dnodelnopt $Dnodemdls $Name.o $Dnodelibs
  88.                 case $? in
  89.                  0) rm -f $Name.o;;
  90.                  *) echo "     $Root link failed."
  91.                     echo
  92.                     rm -f $Name.o $Root
  93.                     exit 1;;
  94.                 esac ;;
  95.          esac ;;
  96.      esac
  97.   done
  98. case $Quiet in
  99.   T) ;;
  100.   F) echo "     DINO compilation completed."
  101.      echo ;;
  102. esac
  103.  
  104.